package com.j2some;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.SpringVersion;
import org.springframework.test.context.junit4.SpringRunner;

import com.yinquan.util.DataUtil;
import com.yishun.springboot.Application;
import com.yishun.springboot.dao.CWRServiceTest;
import com.yishun.springboot.mapper.ExternalEnterpriseALDRTMapper;

import lombok.extern.slf4j.Slf4j;

//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = Application.class)
@Slf4j
public class Principal_SeTestMap {

	private static final Logger logger = LoggerFactory.getLogger(Principal_SeTestMap.class);

	@Test
	public void testMapRepeat() {
		
		
		log.info(DataUtil.currTime());
//		Random rand = new Random();
//		Map requestYzwObject = new HashMap();
//		List<Map> requestYzwList = new ArrayList<Map>();
//		for (int i = 0; i < 10; i++) {
//			requestYzwObject.put("ProjectSysNo", rand.nextInt(100) + 1); // 所有项目号赋值到 requestJsonObject
//			requestYzwList.add(requestYzwObject);
//		}
//		log.info("requestYzwList:"+requestYzwList.toString());
	}

	/**
	 * 外部企业实例
	 */
	@Autowired
	ExternalEnterpriseALDRTMapper eealdrtmapper;
	public void map2String() {
		logger.debug("--------------------------------记录方法debug");

		String version = SpringVersion.getVersion();
		String version1 = SpringBootVersion.getVersion();
		log.info(version);
		log.info(version1);
//		eealdrtmapper.selectOne(9527);
//		if(eealdrtmapper.selectOne(9527)==null)
//			log.info("部位空");

//		String a = "100";
//		int a2 = Integer.valueOf(a);
//		log.info(a2);

		String reStr = "src=\"";
		String reSp = "/^data:image\\/(jpeg|png|gif);base64,/";

		String results = reStr.replaceAll(reSp, "qqqqqq");
		log.info("results:" + results);
	}
}
